/****************************************************
	文件：TestPay.cs
	作者：世界和平
	日期：2021/3/12 14:42:28
	功能：Nothing
*****************************************************/

using System;
using System.Collections;
using System.Collections.Generic;
using Rosiness.Event;
using UnityEngine;

public class TestPay : MonoBehaviour
{
	private void Start()
	{
		EventManager.Instance.AddListener<RemoveAdsMsg>(OnHandleEventMsg);
	}

	private void OnDisable()
	{
		EventManager.Instance.RemoveListener<RemoveAdsMsg>(OnHandleEventMsg);
	}

	private void OnHandleEventMsg(IEventMessage msg)
	{
		if (msg is RemoveAdsMsg)
		{
			RemoveAdsMsg temp = msg as RemoveAdsMsg;
			Debug.Log(temp.Value);
			gameObject.SetActive(false);
		}	
	}

	public void Pay()
	{
		PurchaseProxy.pay(1);
	}
}
